const express = require(`express`)
const router = express.Router()
let db = require('../index')
const selectAll =require('../index')

router.use((req, res, next) => {
  console.log(`路由执行成功啦~~~`, Date.now());
  next()
})
// router.get(`/`, (req, res, next) => {
//     res.json({
//       status: 200,
//       data: `请求成功`
//     })
//   })

  router.get(`/content`,(req,res,next)=>{
      let sql = 'select * from content'
      selectAll(sql,res)
    // res.send('ok')
  })

module.exports = router